﻿using IM.Easy.Entity.System;
using IM.Easy.SystemServices.Dtos;
using Mapster;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IM.Easy.SystemServices.Mapper
{
    public class ResourceMapper : IRegister
    {
        public void Register(TypeAdapterConfig config)
        {
            //资源映射
            config.ForType<Folder, ResourcesDto>()
                       .Map(dest => dest.Name, src => src.FolderName)
                       .Map(dest => dest.Icon, src => "folder")
                       .Map(dest => dest.Type, src => "folder")
                       .Map(dest => dest.SubType, src => "folder")
                       .Map(dest => dest.SubType, src => "文件夹");
        }
    }
}
